package org.zcl.elastic.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * .
 *
 * @author zhuchenglin
 * @since 2024/9/8 21:27
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Scroll<T> {

    private String scrollId;
    private Date expires;
    private long totalElements;
    private List<T> content;

    public boolean isEnd() {
        return this.content.size() == 0;
    }
}
